import {legacy_createStore as createStore} from "redux"
// 定义数据
const initState={
    count:0
}
//关联action
function countReducer(state=initState,action){//action {}
    switch(action.type){
        case "Add_COUNT":
            return {...state,count:state.count +action.number}
                default:
                    return state
    }
}
const store=createStore(countReducer)
export default store